<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html style="overflow-y: hidden;">
<head>
	<meta charset="utf-8">
	<title>后台管理系统</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="/css/public.css" media="all" />
	<style>
		span.button.root_close::before {
			content: "\e623";
		}
		span.button.root_open::before {
			content: "\e625";
		}
		.layui-tab {
			margin: 0;
		}
		.layui-tab-item {
			width: 100%;
		}
		.layui-tab-item iframe {
			width: 100%;
		}
		/*.layui-tab-item iframe html {
			overflow: hidden;
		}*/

	</style>
</head>
<body class="childrenBody">
	<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
		<ul id="trace-list" class="layui-tab-title">
			<li class="layui-this">产品信息</li>
			<li>产品企业</li>
			<li>生产过程</li>
		</ul>
		<div class="layui-tab-content" style="height: 100px;">
			<div class="layui-tab-item layui-show">
				<iframe id="produce" src="" frameborder="0"></iframe>
			</div>
			<div class="layui-tab-item">
				<iframe id="manufactor" src="" frameborder="0"></iframe>
			</div>
			<div class="layui-tab-item">
				<iframe id="recordList" src="" frameborder="0"></iframe>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="/layui/layui.js"></script>
	<script src="/js/common/jquery-3.3.1.js"></script>
	<script src="/js/common/jquery.cookie.js"></script>
	<script src="/js/common.js"></script>
	<script src="/layui/mymodule/common.js"></script>
	<script>
        var height = $(document).height();
        $(".layui-tab-item iframe").css('height',(height - 40) + "px");
        $(window).on("resize",function () {
            $(".layui-tab-item iframe").css('height',(height - 40) + "px");
        });

        var request = GetRequest();
		$("#produce").attr("src","/admin/traceability/record/traceshow/produceEdit?id=" + request.produceId);
		$("#manufactor").attr("src","/admin/traceability/record/traceshow/companyEdit?id=" + request.manufactorId);
		$("#recordList").attr("src","/admin/traceability/record/traceshow/recordList?id=" + request.id + "&processTemplateId=" + request.processTemplateId);

        //获取路径中的参数
        function GetRequest() {
            var url = location.search;         //获取url中"?"符后的字串
            var theRequest = new Object();
            if (url.indexOf("?") != -1) {
                var str = url.substr(1);
                var strs = str.split("&");
                for (var i = 0; i < strs.length; i++) {
                    theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
                }
            }
            return theRequest;
        }
	</script>
	<script type="text/javascript" src="/js/traceablility/record/traceInfoShow.js"></script>
</body>
</html>